<?php



class CategoriesMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.CategoriesMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('categories');
		$tMap->setPhpName('Categories');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('CATEGORIES_ID', 'CategoriesId', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('CATEGORIES_IMAGE', 'CategoriesImage', 'string', CreoleTypes::VARCHAR, false, 64);

		$tMap->addForeignKey('PARENT_ID', 'ParentId', 'int', CreoleTypes::INTEGER, 'categories', 'CATEGORIES_ID', false, null);

		$tMap->addColumn('SORT_ORDER', 'SortOrder', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('CREATED_AT', 'CreatedAt', 'int', CreoleTypes::TIMESTAMP, false, null);

		$tMap->addColumn('UPDATED_AT', 'UpdatedAt', 'int', CreoleTypes::TIMESTAMP, false, null);

		$tMap->addColumn('DELETED_AT', 'DeletedAt', 'int', CreoleTypes::TIMESTAMP, false, null);

	} 
} 